<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户详情</title>
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- 自定义 CSS -->
    <link href="{{ url_for('static', filename='css/styles.css') }}" rel="stylesheet">
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
        <div class="container-fluid">
            <a class="navbar-brand" href="#">DCO管理系统</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" 
                aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto">
                    <!-- 事件管理菜单项 -->
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('view_events') }}">事件管理</a>
                    </li>
                    <!-- 用户管理菜单项 -->
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('view_installed_users') }}">用户管理</a>
                    </li>
                    <!-- 其他菜单项（如果有） -->
                    <!-- <li class="nav-item">...</li> -->
                </ul>
            </div>
        </div>
    </nav>    

    <!-- 主容器 -->
    <div class="container" style="margin-top: 80px;">
        <h1 class="mb-4 text-center">用户详情</h1>

        <!-- 用户信息展示 -->
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-md-4">
                        <img src="{{ user.avatar_url }}" class="img-fluid rounded-circle" alt="头像" style="width: 150px;">
                    </div>
                    <div class="col-md-8">
                        <h3>{{ user.name }}</h3>
                        <p><strong>登录名:</strong> {{ user.login }}</p>
                        <p><strong>邮箱:</strong> {{ user.email }}</p>
                        <p><strong>电话:</strong> {{ user.phone or '无' }}</p>
                        <p><strong>个人简介:</strong> {{ user.bio or '无' }}</p>
                        <p><strong>公司:</strong> {{ user.company or '无' }}</p>
                        <p><strong>位置:</strong> {{ user.location or '无' }}</p>
                        <p><strong>博客链接:</strong> <a href="{{ user.blog }}" target="_blank">{{ user.blog or '无' }}</a></p>
                        <p><strong>粉丝数:</strong> {{ user.followers }}</p>
                        <p><strong>关注数:</strong> {{ user.following }}</p>
                    </div>
                </div>
            </div>
        </div>

        <!-- 返回按钮 -->
        <div class="mt-3">
            <a href="{{ url_for('view_installed_users') }}" class="btn btn-primary">返回用户列表</a>
        </div>
    </div>

    <!-- Bootstrap JS (optional) -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
